package org.rainbowinverted.charging.device.connect.ykc.server.util;

import java.util.concurrent.CompletableFuture;
import java.util.concurrent.Executor;
import java.util.concurrent.TimeUnit;

/**
 * 延时执行工具类
 * @author hehuaiping
 */
public class DelayedExecutorUtil {
    private DelayedExecutorUtil() {
        throw new AssertionError("No DelayedExecutorUtil instances for you!");
    }

    private final static Executor INSTANCE = CompletableFuture.delayedExecutor(200, TimeUnit.MILLISECONDS);

    public static Executor getExecutor() {
        return INSTANCE;
    }
}
